<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>分页器</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .page{
            width: 600px;
            height: 40px;
            border: 1px solid gray;
            margin: 50px auto 0;
        }
        .page ul{
            list-style: none;
        }
        .page ul li a{
            text-decoration: none;
            font:12px '微软雅黑';
            background-color: gold;
            color: black;
            width: 12px;
            height: 16px;
            display: block;
            padding: 5px 5px;
            float: left;
            margin-right: 10px;
            line-height: 16px;
            text-align: center;
            margin-top: 7px;
        }
        .page ul li .a1{
            width: 50px;
            margin-left: 90px;
        }
        .page ul li .a2{
            background-color: white;
        }
        .page ul li .a3{
            width: 50px;

        }
    </style>
</head>
<body>
    <div class="page">
        <ul>
            <li><a href="#" class="a1">上一页</a></li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#" class="a2">...</a></li>
            <li><a href="#">17</a></li>
            <li><a href="#">18</a></li>
            <li><a href="#">19</a></li>
            <li><a href="#">20</a></li>
            <li><a href="#" class="a3">下一页</a></li>
        </ul>
    </div>
</body>
</html>